﻿/*=======================================================================================
	TASK 9:                                                      {Conditional Statements}
	We are given 5 integer numbers. Write a program that checks if the sum of some subset 
    of them is 0. Example: 3, -2, 1, 1, 8 --> 1+1-2=0. 
=======================================================================================*/

using System;

class IsSubsetSumIsZero
{
    static void Main()
    {
        int firstNum, secondNum, thirdNum, fourthNum, fifthNum,sum;

        Console.Write("first number= ");
        firstNum = int.Parse(Console.ReadLine());
        Console.Write("second number=");
        secondNum = int.Parse(Console.ReadLine());
        Console.Write("third number= ");
        thirdNum = int.Parse(Console.ReadLine());
        Console.Write("fourth number=");
        fourthNum = int.Parse(Console.ReadLine());
        Console.Write("fifth number= ");
        fifthNum = int.Parse(Console.ReadLine());

        for (int i = 0; i < 3; i++)
        {
            sum = firstNum - secondNum;
            if (sum == 0)
            {
                Console.WriteLine("{0}-{1}=0",firstNum,secondNum);
            }
            sum = sum - thirdNum;
        }
    }
}

